#pragma once

#include "./providers/PclDefaultModel.h"
#include "PclInclude.h"
#include "includeBase.h"
class PclContext
{

private:
    PclContext();

public:
    static PclContext& get();

public: // Method
    void updateUI();
    void refreshModel(PclDefaultModel& model);
    void updateCamera(PclDefaultModel& model, int index);
    void updateCoordinate(PclDefaultModel& model);
    void showCoordinate(PclDefaultModel& model);
    void updatePointSize(PclDefaultModel& model);
    void updatePointColor(PclDefaultModel& model);
    void updateBackgroundColor(PclDefaultModel& model);
    void close();

public: // Property
    inline QVTKOpenGLNativeWidget* qvtkWidget() const { return qvtkWidget_; }
    void setQvtkWidget(QVTKOpenGLNativeWidget* value) { qvtkWidget_ = value; }
    inline pcl::visualization::PCLVisualizer::Ptr viewer() const
    {
        return viewer_;
    }
    void setViewer(pcl::visualization::PCLVisualizer::Ptr value)
    {
        viewer_ = value;
    }

    inline PointCloudT::Ptr cloud() const { return cloud_; }
    void setCloud(PointCloudT::Ptr value) { cloud_ = value; }

private:
    QVTKOpenGLNativeWidget* qvtkWidget_;
    pcl::visualization::PCLVisualizer::Ptr viewer_;
    PointCloudT::Ptr cloud_;
};
